<?php 
//引进配置信息
include 'include/init.php';
//引入数据库配置信息
include 'include/mysql.config.php';
//引入公共函数
include 'include/common.fun.php';
//公共数据
include 'data/common_data.php';


$sql="SELECT count(art_id) as count from wd_article";
$art_count=$db->getOne($sql);
//总数
// $page=1;
$limit=6;//页显示数
$count=$art_count['count'];

// $page=ceil($count/$limit);


$current=isset($_GET['page'])?$_GET['page']:1;
$start=($current-1)*$limit;
$page = new Page($current,$count,$limit,5);
$page_link = $page->first()->prev()->num()->next()->show();
$sql="SELECT * FROM wd_article order by art_id asc limit $start,$limit";
$news=$db->getAll($sql);
//加载视图页面
include 'view/news.php';